package com.example.driptip.model;

import java.util.ArrayList;
import java.util.List;

public class Checklist {
    private static final int MAX_ITEMS = 10;
    private List<String> items;

    public Checklist() {
        items = new ArrayList<>(MAX_ITEMS);
        for (int i = 0; i < MAX_ITEMS; i++) {
            items.add("");
        }
    }

    public String getItem(int index) {
        if (index >= 0 && index < MAX_ITEMS) {
            return items.get(index);
        }
        return "";
    }

    public void setItem(int index, String value) {
        if (index >= 0 && index < MAX_ITEMS) {
            items.set(index, value);
        }
    }

    public List<String> getAllItems() {
        return new ArrayList<>(items);
    }

    public void setAllItems(List<String> newItems) {
        if (newItems != null) {
            items.clear();
            for (int i = 0; i < MAX_ITEMS; i++) {
                items.add(i < newItems.size() ? newItems.get(i) : "");
            }
        }
    }
} 